package com.naxian.controller.MyApplication;

import com.naxian.service.jobApplication.JobApplicationService;
import com.naxian.service.recruit.RecruitService;
import com.naxian.util.JsonResult;
import com.naxian.vo.MyApplication;
import com.naxian.vo.MyApplicationVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
@Controller
public class MyApplicationController {
    @Autowired
    private RecruitService recruitService;
    @Autowired
    private JobApplicationService jobApplicationService;
    @GetMapping("myApplication")
    @ResponseBody
    public JsonResult  getByPerIdAndResumeDeliverID(HttpServletRequest request){
         Integer perId = (Integer)request.getSession().getAttribute("loginPerId");
        System.out.println(perId+"获得的perID为："+perId);
        MyApplication myApplication = jobApplicationService.getByPerId(perId);
        System.out.println(myApplication);
        return  new  JsonResult(0,"获取成功",myApplication.getMyApplicationVOList());
    }
}
